Skip to content

Separate config loading from core into cli - #134

Merged
semohr merged 11 commits into
mainfrom
seperate_config
Oct 12, 2026
Merged

semohr merged 11 commits into
mainfrom
seperate_config

Conversation

@semohr

@semohr semohr commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Refactors the configuration management by consolidating CLI-specific configuration logic into a new plistsync/cli/config.py module. Improves the overall structure and clarity of config handling.

Core abstractions do not depend on eyconf and the global config object anymore!

closes #115

@github-actions

Copy link
Copy Markdown

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

@semohr semohr changed the title Seperate config Separate config Sep 23, 2026
@semohr semohr changed the title Separate config Separate config loading from core into cli Sep 23, 2026

@pSpitzner pSpitzner left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, mostly. see below

i pushed one small change that seemed more consistent to me.
i think from_config is the most likely entrypoint now, so id vote that we put all default kwargs needed for libraries into the configs.

  • from_config never gets extra args, defaults come from user configs
  • library.__init__ has no default values for args.

Perspective questions as prep for multi-library support:
do we want each library to rely more strongly on their config object? that would solve this consistently, and avoid the extra attributes i touched for traktor and plex.
feels sensible to me, now that we added the config protocol to library class.

Comment thread plistsync/core/config.py Resolved
Base automatically changed from library_cli to main September 27, 2026 15:25
@semohr

semohr commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

do we want each library to rely more strongly on their config object? that would solve this consistently, and avoid the extra attributes i touched for traktor and plex.

I would only strongly rely on the config in the public interface (i.e. if needed by the abstraction). I guess we should not rely on it too much for normal api or library methods. We should enable all functionality without the need for a config somehow and only have the config for convenience/abstraction imo.

@semohr
semohr removed this pull request from stack #133 October 12, 2026 16:30
@semohr
semohr merged commit 7cabac0 into main Oct 12, 2026
11 of 14 checks passed
semohr added a commit that referenced this pull request Oct 18, 2026

This branch had an error being deployed

1 failed deployment
integration_tests — 2e14c413 Deployed Oct 12, 2026 by semohr via test-notebooks (tidal) #566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seperate CLI and library functions.

2 participants